#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int i = 0;
int main()
{
	unsigned n;
	printf("please enter the number of disc:\n");
	scanf("%d", &n);
	movedisc(n, 'a', 'b', 'c');
	printf("\tTotal:%d\n", i);
	return 0;
}
movedisc(unsigned n, char fromneedle, char toneedle, char usingneedle)
{
	if (n == 1)
		printf("%2d-(%2d):%c==>%c\n", ++i, n, fromneedle, toneedle);
	else {
		movedisc(n - 1, fromneedle, usingneedle, toneedle);
		printf("%2d-(%2d):%c==>%c\n", ++i, n, fromneedle, toneedle);
		movedisc(n - 1, usingneedle, toneedle, fromneedle);
	}

		
}